.btn-6 {
    overflow: hidden;
    position: relative;
}

.btn-6::before,
.btn-6::after,
.btn-6 span::before,
.btn-6 span::after {
    background: linear-gradient(to right, rgba(19, 239, 255, 0), #ffb006);
    transition: all 2s;
    position: absolute;
    content: '';
}

.btn-6::before,
.btn-6::after {
    width: 100%;
    height: 1px;
}

.btn-6::before {
    top: 0;
    left: -100%;
}

.btn-6::after {
    bottom: 0;
    right: -100%;
}

.btn-6 span::before,
.btn-6 span::after {
    width: 1px;
    height: 100%;
}

.btn-6 span::before {
    bottom: -100%;
    left: 0;
}

.btn-6 span::after {
    top: -100%;
    right: 0;
}

.btn-6::before {
    animation: topA 1s linear infinite;
    animation-delay: .5s;
}

@keyframes topA {
    100% {
        left: 100%;
    }
}

.btn-6 span::after {
    animation: rightA 1s linear infinite;
    animation-delay: 1s;
}

@keyframes rightA {
    100% {
        top: 100%;
    }
}

.btn-6::after {
    animation: bottomA 1s linear infinite;
    animation-delay: 1.5s;
}

@keyframes bottomA {
    100% {
        right: 100%;
    }
}

.btn-6 span::before {
    animation: leftA 1s linear infinite;
    animation-delay: 2s;
}

@keyframes leftA {
    100% {
        bottom: 100%;
    }
}